package com.atguigu.gmall.feign.item;

import com.atguigu.gmall.common.result.Result;
import com.atguigu.gmall.product.vo.SkuDetailVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@Api(tags = "远程调用-商品详情")//weball===service-item===service-product
@FeignClient("service-item")//调用哪个微服务
@RequestMapping("/api/inner/rpc/product")//调用地址
public interface SkuDetailFeignClient {

    @ApiOperation("获取商品详情数据")
    @GetMapping("/sku/detail/{skuId}")//远程调用 要发送的请求方式 及 指定ip地址
    public Result<SkuDetailVo> getSkuDetails(@PathVariable("skuId") Long skuId);
}
